Yanfly Save Engine question

Yanfly Save Engine: http://yanflychannel.wordpress.com/rmvxa/menu-scripts/ace-save-engine/

This script shows the location that you saved from on the save list. How can I make it so instead of the map name, it shows the map display name?

Thanks!
Find this method in the script:

#-------------------------------------------------------------------------- # draw_save_location #-------------------------------------------------------------------------- def draw_save_location(dx, dy, dw) return if @header[:map].nil? reset_font_settings change_color(system_color) draw_text(dx, dy, dw, line_height, YEA::SAVE::LOCATION) change_color(normal_color) cx = text_size(YEA::SAVE::LOCATION).width return if $data_mapinfos[@header[:map].map_id].nil? text = @header[:map].display_name text = $data_mapinfos[@header[:map].map_id].name if text == "" draw_text(dx+cx, dy, dw-cx, line_height, text) endChange this line:
Code:
    text = $data_mapinfos[@header[:map].map_id].name if text == ""
to this:
Code:
    text = @header[:map].display_name if text == ""
I have not tested this. If it doesn't work, try this instead:

Code:
    text = @header[:map].map.display_name if text == ""
If THAT doesn't work, I'll look at it more closely.
Find this method in the script:

#-------------------------------------------------------------------------- # draw_save_location #-------------------------------------------------------------------------- def draw_save_location(dx, dy, dw) return if @header[:map].nil? reset_font_settings change_color(system_color) draw_text(dx, dy, dw, line_height, YEA::SAVE::LOCATION) change_color(normal_color) cx = text_size(YEA::SAVE::LOCATION).width return if $data_mapinfos[@header[:map].map_id].nil? text = @header[:map].display_name text = $data_mapinfos[@header[:map].map_id].name if text == "" draw_text(dx+cx, dy, dw-cx, line_height, text) endChange this line:
Code:
    text = $data_mapinfos[@header[:map].map_id].name if text == ""
to this:
Code:
    text = @header[:map].display_name if text == ""
I have not tested this. If it doesn't work, try this instead:
Code:
    text = @header[:map].map.display_name if text == ""
If THAT doesn't work, I'll look at it more closely.
Awesome, thanks!

I modified some scripts so that the display name would recognize variables. Is there a way to make this recognize variables too? A name of one of the maps is \N[001]'s house, and that's exactly how it's showing up on the save file.
ugh! I just looked more closely, and realized you didn't really need to change ANYTHING. If the display name exists, it will use it. Otherwise it will use the map name.

So the method as it was should already give you the results you're asking for. If it's displaying the map name, it means the display name was not set on the map at the time the save file was made (even if you've gone back into the editor and given it a display name afterwards).

To add the extra you've requested, add this line before the final draw_text line:

text = convert_escape_characters(text)So your final method SHOULD look like this:

Code:
  #--------------------------------------------------------------------------  # draw_save_location  #--------------------------------------------------------------------------  def draw_save_location(dx, dy, dw)    return if @header[:map].nil?    reset_font_settings    change_color(system_color)    draw_text(dx, dy, dw, line_height, YEA::SAVE::LOCATION)    change_color(normal_color)    cx = text_size(YEA::SAVE::LOCATION).width    return if $data_mapinfos[@header[:map].map_id].nil?    text = @header[:map].display_name    text = $data_mapinfos[@header[:map].map_id].name if text == ""    text = convert_escape_characters(text)    draw_text(dx+cx, dy, dw-cx, line_height, text)  end
TRY changing this line:

draw_text(dx+cx, dy, dw-cx, line_height, text)to this:
Code:
draw_text_ex(dx+cx, dy, text)
in the same method - the line below the one you just changed, in fact.
Works like a charm. Thanks!
Can you see my comment above? I edited my post, because I led you astray both times. The final method in that previous post is what you SHOULD have.
I tried installing the script to my game but it wouldn't let me save.

@Taishiro13 , please refrain from necro-posting in a thread. Necro-posting is posting in a thread that has not had posting activity in over 30 days. You can review our forum rules here. Thank you.



Please make your own thread, as your question has little to do with this thread.

Closing this.

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-save-engine-question.20943/