collapse collapse

 Community


 User Info




Willkommen Gast. Bitte einloggen oder registrieren.

 Partnerseiten

rpgvx.net

Das Forum ist offline

Autor Thema: Simple Map-Name  (Gelesen 6583 mal)

Offline Onkel Hell

  • Sol Invictus
  • Administrator
  • VX-Kenner
  • ****
  • Beiträge: 562
  • You can't shoot me, I'm AIDS !
Simple Map-Name
« am: April 23, 2008, 07:30:07 »
Beschreibung
Ursprünglich sollte das hier ein Addon für mein Simple Day and Night werden um den Mapnamen wieder gescheit anzeigen zu können aber das Script läuft auch ohne ganz gut
Last Update : v1.23 - 09.11.08
Changelog :
Spoiler for Hiden:
-----------------------------------------------------------------------------------
v1.24
-----------------------------------------------------------------------------------
bugfixes
-----------------------------------------------------------------------------------
v1.23
-----------------------------------------------------------------------------------
funktion zum nicht anzeigen eingebaut
-----------------------------------------------------------------------------------
v1.22
-----------------------------------------------------------------------------------
fehler von gsub! behoben
-----------------------------------------------------------------------------------
v1.21
-----------------------------------------------------------------------------------
diverse fehler behoben

Anleitung
#==============================================================================
# F.A.Q.
#==============================================================================
# If you want a background picture for your mapnames just put a picture
# called "location_back" into the folder "Graphics/System"
#==============================================================================
# Main config
#==============================================================================
  X_POSITION = 10           # Default = 10
  Y_POSITION = 10           # Default = 10
  DELAY = 2                 # How long the Mapname is shown (in seconds)
  ALIGN = 0                 # Align of the Mapname(0 = left, 1 = center, 2 = right)
  PIC_FORMAT = "png"        # Format for the Nightlight-Maps
  COLOR = 255,255,255,255   # Textcolor, default is white (255,255,255,255)
  $show_mapname = true      # Visible ?
Beispiel Hintergrund


Screenshot
Spoiler for Hiden:

Script v1.24
Spoiler for Hiden:
#==============================================================================
#  Simple Map-Name
#
#  Version : 1.24 - 12.11.08
#  Created by : hellMinor
#  Do NOT redistribute without my permission
#  Description : A little script to show the name of the current map
#  Note : This script was originally made to cut out the additions to
#         the mapname made by my Day and Night script but it works normally
#         without it.
#
#==============================================================================
# F.A.Q.
#==============================================================================
# If you want a background picture for your mapnames just put a picture
# called "location_back" into the folder "Graphics/System"
#==============================================================================
# Main config
#==============================================================================
  X_POSITION = 10           # Default = 10
  Y_POSITION = 10           # Default = 10
  DELAY = 2                 # How long the Mapname is shown (in seconds)
  ALIGN = 0                 # Align of the Mapname(0 = left, 1 = center, 2 = right)
  PIC_FORMAT = "png"        # Format for the Nightlight-Maps
  COLOR = 255,255,255,255   # Textcolor, default is white (255,255,255,255)
  $show_mapname = true      # Visible ?
#==============================================================================
class Scene_Map
#==============================================================================
  def update_transfer_player
    return unless $game_player.transfer?
    fade = (Graphics.brightness > 0)
    fadeout(30) if fade
    @spriteset.dispose
    dispose_showname_window
    $game_player.perform_transfer
    $game_map.autoplay
    $game_map.update
    Graphics.wait(15)
    @spriteset = Spriteset_Map.new
    fadein(30) if fade
    Input.update
    create_showname_window
  end
#------------------------------------------------------------------------------
  def create_showname_window
    @str = $game_map.name.gsub(/\[\w*\]/) {""}
    @mapname = Window_MapName.new(X_POSITION,Y_POSITION,200,56,@str)
    @mapname.z = 300
    @delay = DELAY*60
  end
#------------------------------------------------------------------------------ 
  def dispose_showname_window
    @mapname.dispose if defined?(@mapname)
  end
#------------------------------------------------------------------------------
  alias update_mapname_adds update
  def update
    update_mapname_adds
    if $show_mapname == true and defined?(@mapname) and not @mapname.disposed?
      @mapname.fade_in if @mapname.contents_opacity <= 255 and @delay > 0
      @delay -= 1 if @mapname.contents_opacity == 255 and @delay > 0
      @mapname.fade_out if @mapname.contents_opacity >= 0 and @delay == 0
    end
  end
#------------------------------------------------------------------------------
  def update_scene_change
    return if $game_player.moving?    # Is player moving?
    dispose_showname_window if $game_temp.next_scene != nil
    case $game_temp.next_scene
    when "battle"
      call_battle
    when "shop"
      call_shop
    when "name"
      call_name
    when "menu"
      call_menu
    when "save"
      call_save
    when "debug"
      call_debug
    when "gameover"
      call_gameover
    when "title"
      call_title
    else
      $game_temp.next_scene = nil
    end
  end
 
end
#==============================================================================
class Window_MapName < Window_Base
#============================================================================== 
  def initialize(x = 0,y = 0,width = 544, height = 416, text = "")
    super(x,y,width,height)
    self.opacity = 0
    self.contents_opacity = 0
    @text = text
    refresh
  end
#------------------------------------------------------------------------------ 
  def refresh
    self.contents.clear
    @sprite = Sprite.new()
    begin
    @sprite.bitmap = Bitmap.new("Graphics/System/location_back")
    rescue Errno::ENOENT
    end
    @sprite.opacity = 0
    @sprite.x = X_POSITION+5
    @sprite.y = Y_POSITION+5
    self.contents.font.color = Color.new(COLOR[0],COLOR[1],COLOR[2],COLOR[3])
    self.contents.draw_text(4, 0, self.width - 40, WLH, @text, ALIGN)
  end
#------------------------------------------------------------------------------
  def dispose
    @sprite.dispose
    super
  end
#------------------------------------------------------------------------------
  def fade_in
    self.contents_opacity += 2
    @sprite.opacity += 2
  end
#------------------------------------------------------------------------------
  def fade_out
    self.contents_opacity -= 2
    @sprite.opacity -= 2
  end
#------------------------------------------------------------------------------   
end
#==============================================================================
class Scene_Title < Scene_Base
#==============================================================================
  alias load_database_mapname_adds load_database
  def load_database
    load_database_mapname_adds
    $data_mapinfos      = load_data("Data/MapInfos.rvdata")
    for key in $data_mapinfos.keys
      $data_mapinfos[key] = $data_mapinfos[key].name
    end
  end
 
end
#==============================================================================
class Game_Map
#============================================================================== 
  def name
    $data_mapinfos[@map_id]
  end
 
end

Script v1.23
Spoiler for Hiden:
#==============================================================================
#  Simple Map-Name
#
#  Version : 1.23 - 09.11.08
#  Created by : hellMinor
#  Do NOT redistribute without my permission
#  Description : A little script to show the name of the current map
#  Note : This script was originally made to cut out the additions to
#         the mapname made by my Day and Night script but it works normally
#         without it.
#
#==============================================================================
# F.A.Q.
#==============================================================================
# If you want a background picture for your mapnames just put a picture
# called "location_back" into the folder "Graphics/System"
#==============================================================================
# Main config
#==============================================================================
  X_POSITION = 10           # Default = 10
  Y_POSITION = 10           # Default = 10
  DELAY = 2                 # How long the Mapname is shown (in seconds)
  ALIGN = 0                 # Align of the Mapname(0 = left, 1 = center, 2 = right)
  PIC_FORMAT = "png"        # Format for the Nightlight-Maps
  COLOR = 255,255,255,255   # Textcolor, default is white (255,255,255,255)
  $show_mapname = true      # Visible ?
#==============================================================================
class Scene_Map
#==============================================================================
  def update_transfer_player
    return unless $game_player.transfer?
    fade = (Graphics.brightness > 0)
    fadeout(30) if fade
    @spriteset.dispose
    dispose_showname_window
    $game_player.perform_transfer
    $game_map.autoplay
    $game_map.update
    Graphics.wait(15)
    @spriteset = Spriteset_Map.new
    fadein(30) if fade
    Input.update
    create_showname_window
  end
#------------------------------------------------------------------------------
  def create_showname_window
    @str = $game_map.name.gsub(/\[\w*\]/) {""}
    @mapname = Window_MapName.new(X_POSITION,Y_POSITION,200,56,@str)
    @mapname.z = 300
    @delay = DELAY*60
  end
#------------------------------------------------------------------------------ 
  def dispose_showname_window
    @mapname.dispose if defined?(@mapname)
  end
#------------------------------------------------------------------------------
  alias update_mapname_adds update
  def update
    update_mapname_adds
    if $show_mapname == true and defined?(@mapname)
      @mapname.fade_in if @mapname.contents_opacity <= 255 and @delay > 0
      @delay -= 1 if @mapname.contents_opacity == 255 and @delay > 0
      @mapname.fade_out if @mapname.contents_opacity >= 0 and @delay == 0
    end
  end
#------------------------------------------------------------------------------   
  alias call_battle_mapname call_battle
  def call_battle
    call_battle_mapname
    dispose_showname_window
  end
#------------------------------------------------------------------------------   
  alias call_shop_mapname call_shop
  def call_shop
    call_shop_mapname
    dispose_showname_window
  end
#------------------------------------------------------------------------------   
  alias call_name_mapname call_name
  def call_name
    call_name_mapname
    dispose_showname_window
  end
#------------------------------------------------------------------------------     
  alias call_menu_mapname call_menu
  def call_menu
    call_menu_mapname
    dispose_showname_window   
  end
#------------------------------------------------------------------------------   
  alias call_save_mapname call_save
  def call_save
    call_save_mapname
    dispose_showname_window
  end
#------------------------------------------------------------------------------ 
  alias call_debug_mapname call_debug
  def call_debug
    call_debug_mapname
    dispose_showname_window
  end
#------------------------------------------------------------------------------   
  alias call_gameover_mapname call_gameover
  def call_gameover
    call_gameover_mapname
    dispose_showname_window
  end
#------------------------------------------------------------------------------   
  alias call_title_mapname call_title
  def call_title
    call_title_mapname
    dispose_showname_window
  end
 
end
#==============================================================================
class Window_MapName < Window_Base
#============================================================================== 
  def initialize(x = 0,y = 0,width = 544, height = 416, text = "")
    super(x,y,width,height)
    self.opacity = 0
    self.contents_opacity = 0
    @text = text
    refresh
  end
#------------------------------------------------------------------------------ 
  def refresh
    self.contents.clear
    @sprite = Sprite.new()
    begin
    @sprite.bitmap = Bitmap.new("Graphics/System/location_back")
    rescue Errno::ENOENT
    end
    @sprite.opacity = 0
    @sprite.x = X_POSITION+5
    @sprite.y = Y_POSITION+5
    self.contents.font.color = Color.new(COLOR[0],COLOR[1],COLOR[2],COLOR[3])
    self.contents.draw_text(4, 0, self.width - 40, WLH, @text, ALIGN)
  end
#------------------------------------------------------------------------------
  def fade_in
    self.contents_opacity += 2
    @sprite.opacity += 2
  end
#------------------------------------------------------------------------------
  def fade_out
    self.contents_opacity -= 2
    @sprite.opacity -= 2
  end
#------------------------------------------------------------------------------   
end
#==============================================================================
class Scene_Title < Scene_Base
#==============================================================================
  alias load_database_mapname_adds load_database
  def load_database
    load_database_mapname_adds
    $data_mapinfos      = load_data("Data/MapInfos.rvdata")
    for key in $data_mapinfos.keys
      $data_mapinfos[key] = $data_mapinfos[key].name
    end
  end
 
end
#==============================================================================
class Game_Map
#============================================================================== 
  def name
    $data_mapinfos[@map_id]
  end
 
end
Script v1.22
Spoiler for Hiden:
#==============================================================================
#  Simple Map-Name
#
#  Version : 1.22 - 27.04.08
#  Created by : hellMinor
#  Do NOT redistribute without my permission
#  Description : A little script to show the name of the current map
#  Note : This script was originally made to cut out the additions to
#         the mapname made by my Day and Night script but it works normally
#         without it.
#
#==============================================================================
# F.A.Q.
#==============================================================================
# If you want a background picture for your mapnames just put a picture
# called "location_back" into the folder "Graphics/System"
#==============================================================================
# Main config
#==============================================================================
  X_POSITION = 10         # Default = 10
  Y_POSITION = 10         # Default = 10
  DELAY = 2               # How long the Mapname is shown (in seconds)
  ALIGN = 0               # Align of the Mapname(0 = left, 1 = center, 2 = right)
  PIC_FORMAT = "png"      # Format for the Nightlight-Maps
  COLOR = 255,255,255     # Textcolor, default is white (255,255,255)
#==============================================================================
class Scene_Map
#==============================================================================
  def update_transfer_player
    return unless $game_player.transfer?
    fade = (Graphics.brightness > 0)
    fadeout(30) if fade
    @spriteset.dispose
    dispose_showname_window
    $game_player.perform_transfer
    $game_map.autoplay
    $game_map.update
    Graphics.wait(15)
    @spriteset = Spriteset_Map.new
    fadein(30) if fade
    Input.update
    create_showname_window
  end
#------------------------------------------------------------------------------
  def create_showname_window
    @str = $game_map.name.gsub(/\[\w*\]/) {""}
    
    @mapname = Window_MapName.new(X_POSITION,Y_POSITION,200,56)
    @mapname.set_text(@str)
    @mapname.opacity = 0
    @mapname.contents_opacity = 0
    @mapname.z = 300
    
    if File.exist?("Graphics/System/location_back."+PIC_FORMAT)
      @location_back = Sprite.new
      @location_back.bitmap = Cache.system("location_back")
      @location_viewport = Viewport.new(X_POSITION+5,
                                        Y_POSITION+5,
                                        @location_back.bitmap.width,
                                        @location_back.height)
      @location_back.viewport = @location_viewport
      @location_back.opacity = 0
      @location_viewport.z = 250
    end
    @update_showname_fade = "fadein"
    @delay = DELAY*60
    
  end
#------------------------------------------------------------------------------  
  def dispose_showname_window
    @location_back.bitmap.dispose if defined?(@location_back.bitmap)
    @location_back.dispose if defined?(@location_back)
    @location_viewport.dispose if defined?(@location_viewport)
    @mapname.dispose if defined?(@mapname)
    @update_showname_fade = nil
  end
#------------------------------------------------------------------------------
  alias update_mapname_adds update
  def update
    update_mapname_adds
    showname_window_fadein if @update_showname_fade.eql?("fadein")
    showname_window_fadeout if @update_showname_fade.eql?("fadeout")
  end
#------------------------------------------------------------------------------  
  def showname_window_fadeout
    @mapname.contents_opacity -= 2
    @location_back.opacity -= 2 if defined?(@location_back)
    @update_showname_fade = nil if @mapname.contents_opacity == 0
  end
#------------------------------------------------------------------------------  
  def showname_window_fadein
    @mapname.contents_opacity += 2 if @mapname != nil
    @location_back.opacity += 2 if defined?(@location_back)
    @delay -= 1 if @mapname.contents_opacity == 255
    @update_showname_fade = "fadeout" if @delay == 0
  end
#------------------------------------------------------------------------------  
  alias call_battle_mapname call_battle
  def call_battle
    call_battle_mapname
    dispose_showname_window
  end
#------------------------------------------------------------------------------  
  alias call_shop_mapname call_shop
  def call_shop
    call_shop_mapname
    dispose_showname_window
  end
#------------------------------------------------------------------------------  
  alias call_name_mapname call_name
  def call_name
    call_name_mapname
    dispose_showname_window
  end
#------------------------------------------------------------------------------    
  alias call_menu_mapname call_menu
  def call_menu
    call_menu_mapname
    dispose_showname_window    
  end
#------------------------------------------------------------------------------  
  alias call_save_mapname call_save
  def call_save
    call_save_mapname
    dispose_showname_window
  end
#------------------------------------------------------------------------------  
  alias call_debug_mapname call_debug
  def call_debug
    call_debug_mapname
    dispose_showname_window
  end
#------------------------------------------------------------------------------  
  alias call_gameover_mapname call_gameover
  def call_gameover
    call_gameover_mapname
    dispose_showname_window
  end
#------------------------------------------------------------------------------  
  alias call_title_mapname call_title
  def call_title
    call_title_mapname
    dispose_showname_window
  end
  
end
#==============================================================================
class Window_MapName < Window_Base
#==============================================================================  
  def initialize(x = 0,y = 0,width = 544, height = WLH + 32)
    super(x,y,width,height)
  end
#------------------------------------------------------------------------------  
  def set_text(text)
    if text != @text or align != @align
      self.contents.clear
      self.contents.font.color = Color.new(COLOR[0],COLOR[1],COLOR[2])
      self.contents.draw_text(4, 0, self.width - 40, WLH, text, ALIGN)
      @text = text
      @align = ALIGN
    end
  end
  
end
#==============================================================================
class Scene_Title < Scene_Base
#==============================================================================
  alias load_database_mapname_adds load_database
  def load_database
    load_database_mapname_adds
    $data_mapinfos      = load_data("Data/MapInfos.rvdata")
    for key in $data_mapinfos.keys
      $data_mapinfos[key] = $data_mapinfos[key].name
    end
  end
  
end
#==============================================================================
class Game_Map
#==============================================================================  
  def name
    $data_mapinfos[@map_id]
  end
  
end
Script v1.2
Spoiler for Hiden:
#==============================================================================
#  Simple Map-Name
#
#  Version : 1.2 - 24.04.08
#  Created by : hellMinor
#  Do NOT redistribute without my permission
#  Description : A little script to show the name of the current map
#  Note : This script was originally made to cut out the additions to
#         the mapname made by my Day and Night script but it works normally
#         without it.
#
#==============================================================================
# F.A.Q.
#==============================================================================
# If you want a background picture for your mapnames just put a picture
# called "location_back" into the folder "Graphics/System"
#==============================================================================
# Main config
#==============================================================================
  X_POSITION = 10         # Default = 10
  Y_POSITION = 10         # Default = 10
  DELAY = 2               # How long the Mapname is shown (in seconds)
  ALIGN = 0               # Align of the Mapname(0 = left, 1 = center, 2 = right)
  PIC_FORMAT = "png"      # Format for the Nightlight-Maps
  COLOR = 255,255,255     # Textcolor, default is white (255,255,255)
#==============================================================================
class Scene_Map
#==============================================================================
  def update_transfer_player
    return unless $game_player.transfer?
    fade = (Graphics.brightness > 0)
    fadeout(30) if fade
    @spriteset.dispose
    dispose_showname_window
    $game_player.perform_transfer
    $game_map.autoplay
    $game_map.update
    Graphics.wait(15)
    @spriteset = Spriteset_Map.new
    fadein(30) if fade
    Input.update
    create_showname_window
  end
#------------------------------------------------------------------------------
  def create_showname_window
    @str = $game_map.name
    @str.gsub!(/\[\w*\]/) {""}
    
    @mapname = Window_MapName.new(X_POSITION,Y_POSITION,200,56)
    @mapname.set_text(@str)
    @mapname.opacity = 0
    @mapname.contents_opacity = 0
    @mapname.z = 300
    
    if File.exist?("Graphics/System/location_back."+PIC_FORMAT)
      @location_back = Sprite.new
      @location_back.bitmap = Cache.system("location_back")
      @location_viewport = Viewport.new(X_POSITION,
                                        Y_POSITION+5,
                                        @location_back.bitmap.width,
                                        @location_back.height)
      @location_back.viewport = @location_viewport
      @location_back.opacity = 0
      @location_viewport.z = 250
    end
    @update_showname_fade = "fadein"
    @delay = DELAY*60
    
  end
#------------------------------------------------------------------------------  
  def dispose_showname_window
    @location_back.bitmap.dispose if defined?(@location_back.bitmap)
    @location_back.dispose if defined?(@location_back)
    @location_viewport.dispose if defined?(@location_viewport)
    @mapname.dispose if defined?(@mapname)
  end
#------------------------------------------------------------------------------
  alias update_addition update
  def update
    update_addition
    showname_window_fadein if @update_showname_fade.eql?("fadein")
    showname_window_fadeout if @update_showname_fade.eql?("fadeout")
  end
#------------------------------------------------------------------------------  
  def showname_window_fadeout
    @mapname.contents_opacity -= 2
    @location_back.opacity -= 2 if defined?(@location_back)
    @update_showname_fade = nil if @mapname.contents_opacity == 0
  end
#------------------------------------------------------------------------------  
  def showname_window_fadein
    @mapname.contents_opacity += 2
    @location_back.opacity += 2 if defined?(@location_back)
    @delay -= 1 if @mapname.contents_opacity == 255
    @update_showname_fade = "fadeout" if @delay == 0
  end
  
end
#==============================================================================
class Window_MapName < Window_Base
#==============================================================================  
  def initialize(x = 0,y = 0,width = 544, height = WLH + 32)
    super(x,y,width,height)
  end
#------------------------------------------------------------------------------  
  def set_text(text)
    if text != @text or align != @align
      self.contents.clear
      self.contents.font.color = Color.new(COLOR[0],COLOR[1],COLOR[2])
      self.contents.draw_text(4, 0, self.width - 40, WLH, text, ALIGN)
      @text = text
      @align = ALIGN
    end
  end
  
end
« Letzte Änderung: November 12, 2008, 10:49:45 von hellMinor »
Verborgen in der Dunkelheit
Ich kenne nur die Einsamkeit
Auf das kein Gott mich sieht, ich bin ein Eremit


Mega Man Battle Engine


Simple Map-Name

woratana

  • Gast
Simple Map-Name
« Antwort #1 am: April 23, 2008, 09:01:19 »
How about some screenies? :)

Anyway, I think you should alias def update_transfer_player, since I see that you only add the line:
create_showname_windowbelow all commands in that method.

+ In class Window_MapName, you should get map name in there instead of using set_text. Since it'll only show map name.

If you want to use set_text, I suggest to create new Window_Help and change its properties~ :)
    @mapname = Window_MapName.new(X_POSITION,Y_POSITION,150,56)
    @mapname.set_text(@str)
    @mapname.opacity = 0
    @mapname.contents_opacity = 0
to >>
@mapname = Window_Help.new
@mapname.x, @mapname.y = X_POSITION, Y_POSITION
@mapname.width, @mapname.height = 150, 56
^ # You can merge this line with a line above~
@mapname.create_contents # Create contents after resize window
@mapname.set_text(@str, ALIGN)
@mapname.opacity = @mapname.contents_opacity = 0
This will make you don't have to create new window class. :)

Last thing, .eql? in your script looks interesting :)
« Letzte Änderung: April 23, 2008, 09:04:07 von woratana »

Simple Map-Name

Offline Onkel Hell

  • Sol Invictus
  • Administrator
  • VX-Kenner
  • ****
  • Beiträge: 562
  • You can't shoot me, I'm AIDS !
Simple Map-Name
« Antwort #2 am: April 23, 2008, 09:15:14 »
uhm well i just cant use alias there ,
i added dispose_showname_window too a few lines over that

i used @str since i cut the string here
if $game_map.name.to_s.index("[int]") != nil
      @str = $game_map.name.slice[5,self.size-1]
    end
    else if $game_map.name.to_s.index("[dint]") != nil
      @str = $game_map.name.slice(6,$game_map.name.size-1)
    else
      @str = $game_map.name
    end

originally i made this as an addon script for my day and night where you can put [int] or [dint] to the front of the name and the other mapname scripts wont ignore this

the string.eql? just checks if 2 strings are equal in content and lenght , i dont know i have to do this in ruby,
but i.e. in java you cant link 2 strings like this : string1 == string2 , this will allways be false
where string1.equals(string2) gives true
but i dont think ruby is that strict about that
« Letzte Änderung: April 23, 2008, 09:15:32 von hellMinor »
Verborgen in der Dunkelheit
Ich kenne nur die Einsamkeit
Auf das kein Gott mich sieht, ich bin ein Eremit


Mega Man Battle Engine


Simple Map-Name

woratana

  • Gast
Simple Map-Name
« Antwort #3 am: April 23, 2008, 09:32:16 »
Oh, that's nice, you've used Java before :)
I think it will useful when you use Ruby. >_>~

And yeah, Ruby isn't that strict.
You can use @str == 'fadein' :)

Simple Map-Name

Dainreth

  • Gast
Simple Map-Name
« Antwort #4 am: April 23, 2008, 16:24:18 »
Schaut gut aus und funktioniert auch einwandfrei das Skript. Mal wieder gute Arbeit, dankeschön hM!
« Letzte Änderung: April 23, 2008, 17:20:39 von Dainreth »

Simple Map-Name

Copyman

  • Gast
Simple Map-Name
« Antwort #5 am: April 23, 2008, 16:48:01 »
Ich habs grade eingebaut aber wenn ich jetz testen will zeigt er mir immer nen fehrler an, der wie folgt lautet: ????? 'simple map name' ? 46 ??? ArgumentError ????????

wrong number of arguments(0 for 1)

an zeile 46 des scripts steht :    @str = $game_map.name.slice[5,self.size-1]

ich hab nix daran verändert

und bevor die frag kommt, ja ich habe mein altes script das den mapnamen anzeigt vorher gelöscht

Simple Map-Name

Offline Onkel Hell

  • Sol Invictus
  • Administrator
  • VX-Kenner
  • ****
  • Beiträge: 562
  • You can't shoot me, I'm AIDS !
Simple Map-Name
« Antwort #6 am: April 23, 2008, 17:18:15 »
danke für die info , war noch kleiner bug aber is gefixed
ich sollte mir beta tester suchen bevor ich was poste^^
Verborgen in der Dunkelheit
Ich kenne nur die Einsamkeit
Auf das kein Gott mich sieht, ich bin ein Eremit


Mega Man Battle Engine


Simple Map-Name

Copyman

  • Gast
Simple Map-Name
« Antwort #7 am: April 23, 2008, 17:58:54 »
danke fürs ändern, nu das nächste ^.^
kann ich das iwie machen, das das rechts oben am bildschirm in der ecke is anstatt links ?
und, kann ich die farbe des mapnamens auf schwazr ändern, weil ich hab nanderes bild als du drin als hintergrund dafür und das is hell, darauf sieht man den mapnamen in weis nich

Simple Map-Name

Offline Onkel Hell

  • Sol Invictus
  • Administrator
  • VX-Kenner
  • ****
  • Beiträge: 562
  • You can't shoot me, I'm AIDS !
Simple Map-Name
« Antwort #8 am: April 23, 2008, 18:10:17 »
wo der mapname angezeigt wird kannste ganz einfach über die Y_POSITION und X_POSITION steuern,
dabei zu wissen brauch man eignetlich nur das der screen 544x416 pixel breit, wenns rechts sein soll solltest du aber ALIGN = 2 ( rechts ) stellen

das mit der färbe ändern gefällt mir ^^ ich bau das mal ebend ein

edit : so is schon drinne

die farbe stellste einfach über COLOR ein , is der ganz normale RGB farbcode
« Letzte Änderung: April 23, 2008, 18:17:54 von hellMinor »
Verborgen in der Dunkelheit
Ich kenne nur die Einsamkeit
Auf das kein Gott mich sieht, ich bin ein Eremit


Mega Man Battle Engine


Simple Map-Name

Offline Gamekiller48@gmail.com

  • Mr. MACK-Tile
  • ***
  • Beiträge: 260
Simple Map-Name
« Antwort #9 am: April 23, 2008, 18:54:44 »
EINE FRAGE: ES GIBT EIGENTLICH SCHON EIN SCRIPT, DASS DAS GENAU GLEICHE BEWIRKT!!!
Von Moghunter auf RPGRevolution.com! Warum noch ein Script???

Simple Map-Name

ERZENGEL

  • Gast
Simple Map-Name
« Antwort #10 am: April 23, 2008, 18:57:16 »
[ironie]WEIL EBEN BEI MOGHUNTERS SKRIPT [INT] UND [DINT] VON HELLMINROS TOLLEN TAG UND NACHT SYSTEM IM MAPNAME AUFTAUCHEN!!!!!!!!!!!!!!!!!!111111111111einseinself[/ironie]

EDIT: Schönes Skript, hellMinor. Du könntest ja es erleichtern andere "Tags" auszublenden. Also bei diesen KGC-Skript mit den Tilesets da kommen die ja auch vor und falls es noch andere gibt, wäre das ne schöne Sache für die, die so ein Skript wie dieses hier verwenden. Und entschuldigt meinen Sarkasmus :P
« Letzte Änderung: April 23, 2008, 19:07:44 von ERZENGEL »

Simple Map-Name

Offline Onkel Hell

  • Sol Invictus
  • Administrator
  • VX-Kenner
  • ****
  • Beiträge: 562
  • You can't shoot me, I'm AIDS !
Simple Map-Name
« Antwort #11 am: April 23, 2008, 19:21:06 »
Zitat von: GameKiller48
EINE FRAGE: ES GIBT EIGENTLICH SCHON EIN SCRIPT, DASS DAS GENAU GLEICHE BEWIRKT!!!
Von Moghunter auf RPGRevolution.com! Warum noch ein Script???
also dazu fällt mir absolut nichts ein, wenn man schon nicht weiss wovon man redet sollte man besser garnichts sagen
edit:
keiner zwingt mich dazu irgendwelche scripte zu erstellen und/oder zu posten, ich tu das allein weils mir spaß macht und ich anderen leuten damit vllt helfen kann aber bei solchen kommentaren vergeht einem der spaß dabei, wenn keiner mehr scripte posten würde würden leute wie du dann wahrscheinlich ziemlich alt aussehen
denk da einfach mal drüber nach

@erzengel : du sagst es !
also andere tags mit ausblenden zu lassen is einfach , brauchst nur noch mehr suchmuster hinzufügen , bei mehr suchmustern würd ich das allerdings auf nen switch umstellen.
hätte grad ne idee , vllt könnt ich alle mapnamen durch gehen und selbst nach mustern suchen die in [ ] stehen und somit sämtliche tags ausblenden ohne sie zu kennen , das müsste eignetlich gehen
« Letzte Änderung: April 23, 2008, 19:30:17 von hellMinor »
Verborgen in der Dunkelheit
Ich kenne nur die Einsamkeit
Auf das kein Gott mich sieht, ich bin ein Eremit


Mega Man Battle Engine


Simple Map-Name

ERZENGEL

  • Gast
Simple Map-Name
« Antwort #12 am: April 23, 2008, 19:43:28 »
Ich weiß wies ja funktioniert ^^ Es war ein Vorschlag, da Codestellen zu suchen und vor allem zu erweitern nicht gerade Sachen für Anfänger sind. Auch wenn es nur die Änderung im String ist und den einen Parameter zu ändern. Hab mich Ende 2006 auch erst langsam rangetraut, die Strings im RMXP zu ändern, dass ich mein Game auf deutsch habe xD

EDIT: Sorry, ist dein Skript, aber nochmal zur Verdeutlichung ^^: ARRAY = %w{[int] [dint] [vx] [erzvx] [hellminor]}  # Array mit Strings füllen

# In Scene_map#create_showname dann das hier:
# @str erst festlegen, dann Schleife und Abfrage,
# ob eines der Werte des Arrays in $game_map.name vorkommt
@str = $game_map.name
(0...ARRAY.size).each { |i|
  if $game_map.name.include?(ARRAY[i])
    @str = $game_map.name.slice(ARRAY[i].length, $game_map.name.size - 1)
  end
}
Btw das mit den [ ] wäre besser, aber da würde ich ein paar Stunden, wenn nicht Tage, dran setzen :DAlso viel Glück und Spaß.
« Letzte Änderung: April 23, 2008, 20:57:57 von ERZENGEL »

Simple Map-Name

Offline Hanmac

  • true = false
  • Database-Verunstalter
  • **
  • Beiträge: 138
Simple Map-Name
« Antwort #13 am: April 23, 2008, 21:35:27 »
@Erzi:
me + 5min ->
@str = $game_map.name
@str.gsub!(/\[\w*\]/) {""}
xD
"alles ist wahr, wenn wahr einen bestimmten Wert annimmt."

Simple Map-Name

Offline Onkel Hell

  • Sol Invictus
  • Administrator
  • VX-Kenner
  • ****
  • Beiträge: 562
  • You can't shoot me, I'm AIDS !
Simple Map-Name
« Antwort #14 am: April 23, 2008, 21:56:01 »
ok die lösung noch eleganter als die die ich mir jetz überlegt hatte
gsub kannte ich selbst noch net
ich hätte jetz einfach alles bis zum letzten index eines ] weg gesliced

wirklich gute lösung
« Letzte Änderung: April 23, 2008, 21:57:04 von hellMinor »
Verborgen in der Dunkelheit
Ich kenne nur die Einsamkeit
Auf das kein Gott mich sieht, ich bin ein Eremit


Mega Man Battle Engine


 


 Bild des Monats

rooftop party

Views: 3581
By: papilion

 Umfrage

  • Wer soll das BdM gewinnen?
  • Dot Kandidat 1
  • 3 (25%)
  • Dot Kandidat 2
  • 1 (8%)
  • Dot Kandidat 3
  • 2 (16%)
  • Dot Kandidat 4
  • 0 (0%)
  • Dot Kandidat 5
  • 6 (50%)
  • Stimmen insgesamt: 12
  • View Topic

 Schnellsuche





SimplePortal 2.3.3 © 2008-2010, SimplePortal