[XP][VX][VXA] Show Event Name

Started by LiTTleDRAgo, December 22, 2010, 10:00:05 am

Previous topic - Next topic

Xuroth

March 30, 2011, 04:01:07 am #40 Last Edit: March 30, 2011, 06:47:46 am by Xuroth
I figured out why the events in my game stay present. As they are drawn with Scene_Map, they persist because I have the map shown as background withe Zer0's CMS, Leon_Westbrooke's Advanced shop menu, and because I use Zer0's Scene converter (which shows map as background in any scene with blank space or transparency)

Is there a way to make the names dispose when the Scene changes so they disappear when you access the menu, even if it shows the map as background?

Or even just edit the z position of the names so windows appear over top of them?
EDIT: I replaced
self.z = @character.screen_z(@ch)

with
self.z = 10


now the windows all appear over top of the names. While the names are still technically present, this solution is slightly favorable over having to re-draw the names each time a scene chane occurs (which was what I was initially looking for). this produces less lag (though the lag in the system is not very noticable anyways)...

LiTTleDRAgo

update 3.09

-cross engined
-added tag
     \fontsize[ Size ]
     \bold
     \italic
     \fontname[ Fontname ]
     \color[ R, G, B, ALPHA ]

Daclopeda

I get this error when I'm starting the game

Quotescript''line 246: NoMethodError occured.
undefined method `rpgvx?`for nil:NilClass
"What goes around, comes around."


Daclopeda

"What goes around, comes around."

Susanm

This is a great script :)

How can you edit the script to make it so that the name will appear above the event?

i tried editing the below lines and it didnt help at all:

#--------------------------------------------------------------------------
  # * Draw Name
  #--------------------------------------------------------------------------
  def draw_name
    if defined? Bitmap.draw_hemming_text
      @name_event.bitmap.draw_hemming_text(0, 0, 100, 20, @char ,4)
    else
      @name_event.bitmap.draw_text(0, 0, 100, 20, @char ,4)
    end
  end



LiTTleDRAgo

August 12, 2011, 12:53:36 am #46 Last Edit: August 12, 2011, 12:54:50 am by LiTTleDRAgo
look at this part (bold)

Spoiler: ShowHide
Quote
 #--------------------------------------------------------------------------
 # * Update
 #--------------------------------------------------------------------------
 def update
   super
   if @tile_id != @character.tile_id or
       @character_name != @character.character_name or
       (!rpgvx? && @character_hue != @character.character_hue)
     @tile_id, @character_name = @character.tile_id, @character.character_name
     @character_hue = @character.character_hue  if !rpgvx?
     refresh_name
   end
   return @name_event.visible = false if !DIS_EV_SWITCH.nil? and
      (@character.opacity < 50 or $game_switches[DIS_EV_SWITCH])
   visibility if !PRESS_BTN.nil?
   if @name_event.visible
     refresh_name if @cw.nil?
     @name_event.x = @character.screen_x - (@cw.nil? ? 0 : @cw/2)
     @name_event.y = @character.screen_y - @ch
     @name_event.z = 1
     @name_event.opacity    = @character.opacity
     @name_event.blend_type = @character.blend_type
     @name_event.bush_depth = @character.bush_depth
   end
 end
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------
 def refresh_name
   return if @name_event.nil? or @name_event.bitmap.nil? or
     !@name_event.visible or @name_event.disposed? or @character.name_effect.nil?
   @name_event.bitmap.clear
   @character.name_effect.each {|@char| coloring
                                        event_name_check }
   draw_name if($BlizzABS && @character.is_a?(Map_Battler) && PLAYER_NAME) or
           (@character.is_a?(Game_Event) && @character.nametag) or
           (@character.is_a?(Game_Player) && PLAYER_NAME) or
           ($xas_caterpillar && @character.is_a?(Game_Party) && PLAYER_NAME)
   @x_frame, @y_frame = 4, 4
   bit = RPG::Cache.character(@character.character_name,
         @character.character_hue)
   @cw = bit.width / @x_frame / 2
   @ch = bit.height / @y_frame + 10

 end

Susanm

Thank you littledrago... i love your script  :naughty:

Xuroth

September 15, 2011, 10:07:36 am #48 Last Edit: September 15, 2011, 11:35:21 am by Xuroth
If you set a switch to toggle the event names off (by turning switch on) the names clear.
But, if you allow the names to display (via turning the switch off) the names do not reappear until the scene changes or is manually updated. Just thought I'd let you know.  I'm not trying to tear apart your work, I just love this script, so I play around with it. The only changes made so far are to display names above events again...

Though I may try to merge this and ForeverZer0's event proximity icons script so that names only appear when within a couple tiles. I think this would be cool addition to this script.

maybe one of you guys (you or F0) should give that a whirl... just an idea

LiTTleDRAgo

Quote from: Xuroth on September 15, 2011, 10:07:36 am
If you set a switch to toggle the event names off (by turning switch on) the names clear.
But, if you allow the names to display (via turning the switch off) the names do not reappear until the scene changes or is manually updated. Just thought I'd let you know.  I'm not trying to tear apart your work, I just love this script, so I play around with it. The only changes made so far are to display names above events again...


did u use blizz abs? I don't know what's wrong but when I use this without blizz abs it works fine

Quote from: Xuroth on September 15, 2011, 10:07:36 amThough I may try to merge this and ForeverZer0's event proximity icons script so that names only appear when within a couple tiles. I think this would be cool addition to this script.

maybe one of you guys (you or F0) should give that a whirl... just an idea


*updated*

Moshan

How to disable show name for enemies? (I'm using Blizz-Abs)

LiTTleDRAgo

Quote from: adytza001 on October 02, 2011, 03:17:29 am
How to disable show name for enemies? (I'm using Blizz-Abs)


just dont use

Comment : Show Name

in their event page

Moshan

I wasn't using the comment.....But now I change the opacity for enemies names to 0. It's solved! :)

LiTTleDRAgo

Quote from: adytza001 on October 02, 2011, 02:36:51 pm
I wasn't using the comment.....


that means it's a bug, sorry, now it's fixed

Xuroth

October 04, 2011, 07:12:24 pm #54 Last Edit: October 12, 2011, 03:14:32 am by Xuroth
No, I am not using Blizz-ABS. I used a game switch and turned it off via event. the names disappeared when the switch was off, but failed to return when the switch was on again unless you change scenes.

FIXED! With your distance mod it works perfectly. Names appear when they are supposed to. No z-layer issues... Great job!

another suggestion: perhaps add an option in the config to allow a small picture to be shown behind the names. Like a graphic that acts as a background for the names (i.e. a picture frame style graphic). This could allow more visually appealing design, improve readability over certain areas (though you could just use colors) of the tileset/map, and/or help extend the graphic "theme" of a user's game. I think this feature would help immerse players in the game and complete the experience... what do you think?

LiTTleDRAgo

Quote from: JanraeMendoza on October 03, 2011, 02:57:45 pm
May I ask how this can work in XAS III? It doesn't have errors on the script but rather, shows the event name too far from the event


xas use different template for character's graphic


well, the solution is simple :
edit the character graphic to match it's size or replace these lines

      @cw = bit.width / @x_frame / 2
      @ch = bit.height / @y_frame + 15


to


      @cw = @name_event.bitmap.width / @x_frame / 2
      @ch = @name_event.bitmap.height / @y_frame - 5


Quote from: Xuroth on October 04, 2011, 07:12:24 pm
another suggestion: perhaps add an option in the config to allow a small picture to be shown behind the names. Like a graphic that acts as a background for the names (i.e. a picture frame style graphic). This could allow more visually appealing design, improve readability over certain areas (though you could just use colors) of the tileset/map, and/or help extend the graphic "theme" of a user's game. I think this feature would help immerse players in the game and complete the experience... what do you think?


I'll see what I can do after my exam period is finished

Xuroth

sounds great! I'm sure it could be done easily. In fact, I bet the comments and the config together will be longer than the actual code to make it function.

LiTTleDRAgo

updated to ver 4.00

*change

* Method of setting event name
* Adds an image in the back event name


exile360

Sorry for the necro, but how to disable the show name in the latest version? I can't find anything about it nor figure it out. :/ I 'solved' it by changing the event name to an empty space with the command, however the name is shown again once I close the game and return to it. Need this in order to make npc names disappear who leave the map in a cutscene and are never supposed to be seen there again. The event switches to the next page (empty) but the name continues to show.

LiTTleDRAgo

update the script, now the event name won't show if the event graphic is empty